package cn.steel.service;


import cn.steel.domain.entity.User;
import cn.steel.domain.vo.UserVo;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Set;

public interface UserService {
    User getUserById(Long id);
    User getUserByUsername(@Param("username") String username);

    Page<UserVo> getUsersPaginated(int page, int size, String search, String role, Integer status);
    void updateUser(User user);

    void deleteUser(Long id);

    void toggleUserStatus(Long id, Integer status);
    void updateUserProfile(User user, MultipartFile avatarFile);

    void changePassword(Long id, String oldPassword, String newPassword);

    List<User> findUsersByRole(String role);

    Set<Long> findSuppliersWithOrders(Long id);

    Set<Long> findBuyersWithOrders(Long id);
    User findByUsername(String username);

}